<template>
  <div class="wrap">
    <header>
      <van-icon  name="arrow-left" @click="$router.push('/layout/home')"/>
		</header>
    <div class="head">
      <img src="../../images/bargain/yun.png" alt="" />
      <img src="../../images/bargain/csy.png" alt="" class="csy" />
    </div>
    <div class="ing">
      <p class="p">—————— 正在进行中 ——————</p>
      <dl>
        <dt>
          <img src="../../images/bargain/1.png" alt="" />
        </dt>
        <dd>
          <p>已砍 <b>1589元</b>,仅差<b>00.6%</b></p>

          <van-progress
            class="jd"
            stroke-width="20px"
            pivot-text="已售出10682件"
            color="tomato"
            :percentage="50"
          />

          <van-count-down :time="time" class="time">
            <template #default="timeData">
              <span class="block">{{ timeData.hours }}</span>
              <span class="colon">:</span>
              <span class="block">{{ timeData.minutes }}</span>
              <span class="colon">:</span>
              <span class="block">{{ timeData.seconds }}</span>
            </template>
          </van-count-down>

          <button @click.stop="beginkill ">继续砍价</button>
        </dd>
      </dl>
    </div>
    <div class="finish" v-if="false">
      <p class="ok">—————— 已完成 ——————</p>
      <dl>
        <dt>
          <img src="../../images/bargain/1.png" alt="" />
        </dt>
        <dd>
          <p><b>恭喜你</b></p>
          <p>砍成一台压力锅，宝贝正在打包发货中</p>
          <p>请注意查收</p>
        </dd>
      </dl>
    </div>
    <div class="top2">
      <div class="list">
        <div class="left">
          <b>小度在家智能屏</b>
          <img src="../../images/bargain/xdxd.jpg" alt="" />
          <span @click="show = true">点击免费拿</span>
        </div>
        <div class="right">
          <b>小度在家智能屏</b>
          <img src="../../images/bargain/xdxd.jpg" alt="" />
          <span>点击免费拿</span>
        </div>
        <div class="left">
          <b>小度在家智能屏</b>
          <img src="../../images/bargain/xdxd.jpg" alt="" />
          <span @click="show = true">点击免费拿</span>
        </div>
        <div class="right">
          <b>小度在家智能屏</b>
          <img src="../../images/bargain/xdxd.jpg" alt="" />
          <span>点击免费拿</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      time: 30 * 60 * 60 * 1000,
    };
  },
  methods: {
    beginkill(){
      localStorage.setItem('key',1)
      this.$router.push('/cheapDetail');
    }
  },
};
</script>

<style lang="scss" scoped>
.van-icon{
    font-size: 25px;
    color: #fff;
}
header{
	position: absolute;
	top: 0;
	left: 0;
  height: 50px;
	padding: 0 15px;
  z-index: 101;
  width: 100%;
  display: flex;
  align-items: center;
}
.colon {
  display: inline-block;
  margin: 0 4px;
  color: #ee0a24;
}
.block {
  display: inline-block;
  width: 22px;
  color: #fff;
  font-size: 12px;
  text-align: center;
  background-color: #a01619;
}
.wrap {
  width: 100%;
  height: auto;
  background: linear-gradient(to bottom, #ca3439, #e05736);
  display: flex;
  flex-direction: column;

  .head {
    position: relative;
    width: 100%;
    height: 360px;

    img {
      width: 100%;
      height: 340px;
    }
    .csy {
      position: absolute;
      top: 0;
      left: 0;
      /*  z-index: 1; */
      width: 60%;
      height:250px;
      margin-left: 100px;
      margin-top: 70px;
    }
  }
  .ing {
    margin-top: -20px;

    .p {
      display: inline-block;
      color: #eacbca;
      font-size: 13px;
      text-align: center;
      width: 90%;
      height:50px;
      background: #a01619;
      margin-left: 20px;
      border-radius: 15px 15px 0 0;
      line-height: 50px;
    }
    dl {
      display: flex;
      padding:11px;
      width: 90%;
      height: 150px;
      background: #fff;
      margin-left: 20px;
      dt {
        width: 40%;
        height: 100%;
        background: #fff;
        img {
          width: 100%;
          height: 85%;
          padding:5px;
          margin-top: 10px;
        }
      }
      dd {
        width: 60%;
        height: 95%;
        margin-top:15px ;
        b {
          color: red;
        }

        p {
          display: inline-block;
          font-size: 14px;
          width: 100%;
          height: 15px;
          font-weight: 700;
          margin-bottom:7px;
        }
        .time {
          margin-left: 5px;
          margin-top:5px;
        }
        button {
          font-size: 13px;
          width:130px;
          height: 25px;
          border: none;
          border-radius: 10px;
          background: #fd6141;
          color: #fff;
          margin-top:6px;
        }
      }
    }
  }
  .finish {
    margin-top:20px;
    .ok {
      display: inline-block;
      color: #eacbca;
      font-size: 13px;
      text-align: center;
      width: 90%;
      height: 50px;
      background: #a01619;
      margin-left: 20px;
      border-radius: 15px 15px 0 0;
      line-height: 50px;
    }
    dl {
      display: flex;
      width: 90%;
      height:140px;
      background: #fff;
      margin-left:20px;
      font-size: 13px;
      img {
        margin-top: 15px;
        padding: 10px;
      }
      dd {
        padding:10px;
        b {
          color: red;
        }
        p {
          margin-top: 10px;
        }
      }
    }
  }
  .top2 {
    margin-top: 20px;
    margin-left: 5px;
    width: 100%;
    p {
      margin-left: 15px;
      display: inline-block;
      font-size:15px;

      color: #fff;
      width: 90%;
      height: 50px;
      background: #931111;
      border-radius:25px;
      text-align: center;
      line-height:49px;
      font-weight: 700;
    }
    .list {
      width: 90%;/* 
      height: px2rem(180); */
      padding: 15px;
      background: #a22100;
      margin-left: 15px;
      border-radius: 10px;
      display: flex;
      flex-wrap: wrap;
      .left {
        width: 46%;
        height: 85%;
        background: #fddfd5;
        margin-left:10px;
        margin-top: 15px;
        border-radius: 8px;
        font-size: 13px;
        b {
          margin-top:5px;
          text-align: center;
          display: inline-block;
          margin-left:30px;
        }
        img {
          width: 55%;
          height:90px;
          margin-left:35px;
          margin-top: 5px;
        }
        span {
          display: inline-block;
          width: 70%;
          height: 20px;
          background: #ef6c37;
          color: #fff;
          line-height:20px;
          text-align: center;
          border-radius: 15px;
          font-size: 11px;
          margin-left:23px;
          margin-top:5px;
        }
      }

      .right {
        width: 46%;
        height: 85%;
        background: #fddfd5;
        margin-left: 8px;
        margin-top:15px;
        border-radius:8px;
        border-radius: 8px;
        font-size: 13px;
        b {
          margin-top: 5px;
          text-align: center;
          display: inline-block;
          margin-left: 30px;
        }
        img {
          width: 55%;
          height: 90px;
          margin-left:35px;
          margin-top: 5px;
        }
        span {
          display: inline-block;
          width: 70%;
          height:20px;
          background: #ef6c37;
          color: #fff;
          line-height:20px;
          text-align: center;
          border-radius:15px;
          font-size: 11px;
          margin-left: 23px;
          margin-top: 5px;
        }
      }
    }
  }
}
</style>